<!DOCTYPE html>
<html>
{include file="head.html"}
<body>
<div data-role="page" > <div class="header" >
     
    <div class="title">库存商家登录</div>
     
  </div>
  <form method="post" id="login-form" action="{$appkucun}?m=login&a=loginSave"  class="form-horizontal " autocomplete="off">
    <div class="pd-10">
      <div class="input-row">
        <input type="text" id="adminname" class="input-text" name="adminname" placeholder="请输入管理员名称"  >
      </div>
      <div class="input-row">
        <input type="password" id="password" class="input-text"   name="password" placeholder="请输入密码">
      </div>
      <div class="form-btns">
        <div class="row">
          
            <button type="button" id="login-submit" class="btn btn-row btn-larger btn-success">登陆</button>
          </div>
          
        </div>
      </div>
    </div>
  </form>
 </div>
<script type="text/javascript" class="jsa-text">
$(function(){
	$(document).on("click","#login-submit",function(){	
		if(typeof(plus)!="undefined"){
			var info = plus.push.getClientInfo();
			var postdata={
				adminname:$("#adminname").val(),
				password:$("#password").val(),
				token:info.token,
				clientid:info.clientid,
				appid:info.appid,
				appkey:info.appkey,
				appname:'getui',
			}
		}else{
			var postdata={
				adminname:$("#adminname").val(),
				password:$("#password").val()
			}
		}
		$.post("{$appkucun}?m=login&a=Save&ajax=1",postdata,function(data){
			if(data.error==1){
				skyToast(data.message);
			}else{
				
				skyToast("登陆成功");
				setTimeout(function(){
					window.location='{$appkucun}';
				},700);
			}
		},"json");
	});
});
</script>
</body>
</html>
